<%@page contentType="text/html"%>
<%@page pageEncoding="ISO-8859-1"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="t" uri="http://myfaces.apache.org/tomahawk"%>

<%@taglib prefix="a4j" uri="http://richfaces.org/a4j"%>
<%@taglib prefix="rich" uri="http://richfaces.org/rich"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%
        request.setAttribute("nombrePagina", "Ver Creditos a Visitar");
%>

<f:view>
    <%@include file="/WEB-INF/jspf/header.jspf" %>
    <%@include file="/WEB-INF/jspf/breadcumbs.jspf" %>
    <%@include file="/WEB-INF/jspf/options.jspf" %>

    <rich:panel>
        <h1><h:outputText value="Lista Detallada de Creditos a Visitar" /></h1>
        <h:form>
            <h:messages showDetail="true" />

            <h:panelGrid rendered="#{CreditoController.creditos != null}">
            <h3><h:outputText value="Creditos Seleccionados:" /></h3>
            <t:dataTable id="tblCreditos"
                        value="#{CreditoController.creditos}"
                         var="item" >
                <h:column>
                    <h:panelGrid columns="6" cellpadding="2" cellspacing="2">
                        <h:outputText value="Nombre Cliente: "/>
                        <h:outputText value="#{item.cliente}" />

                        <h:outputText value="Fecha Inicio: "/>
                        <h:outputText value="#{item.fechaInicio}" />

                        <h:outputText value="Estado" />
                        <h:outputText value="#{item.fidRecCartera.nombre}" />

                        <h:outputText value="Nro de Cuotas: " />
                        <h:outputText value="#{item.nroCuotas}" />

                        <h:outputText value="Monto Total: "/>
                        <h:outputText value="#{item.montoTotal}" />

                        <h:outputText value="Monto Pagado: "/>
                        <h:outputText value="#{item.montoTotal}" />
                    </h:panelGrid>
                </h:column>
            </t:dataTable>

            </h:panelGrid>

            <h:panelGrid columns="2">
                <h:commandButton id="btnGuardar" value="Guardar Lista" action="#{CreditoController.guardarLista}" />
                <h:commandButton id="btnCancelar" value="Volver Atras" action="volver" />
            </h:panelGrid>

      </h:form>
    </rich:panel>

    <%@include file="/WEB-INF/jspf/footer.jspf" %>
</f:view>
